package TEST;


import static org.junit.Assert.*;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.junit.Before;
import org.junit.Test;

import Server.Game.Questions.Question;
import Server.Game.Questions.QuestionList;

public class QuestionListTest {
	QuestionList list;
	
	@Before
	public void setUp(){
		list = new QuestionList();
		Question q1 = new Question();
		Question q2 = new Question();
		Question q3 = new Question();
		q1.setContent("1.Kysimus");
		q2.setContent("2.Kysimus");
		q3.setContent("3.Kysimus");
		list.getQuestionList().add(q1);
		list.getQuestionList().add(q2);
		list.getQuestionList().add(q3);
	}
	
	
	@Test
	public void getRandomAnswerTest(){
		List<Question> listTmp = new ArrayList<Question>();
		listTmp.addAll(list.getQuestionList());
		assertTrue(listTmp.contains(list.getRandomQuestion()));
	}
	
}